package com.ggk911.pharmacy_system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 订单详情信息
 *
 * @author ggk-911
 * @version 1.0 2023/3/20 10:09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("purchase_info")
public class PurchaseInfo implements Serializable {
    @TableId(value = "purchase_info_id", type = IdType.AUTO)
    private Integer purchaseInfoId;

    private Integer purchaseId;

    private Integer supplierDrugId;

    private Integer purchaseNum;

    private Float purchaseInfoDrugPrice;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date drugInfoProductionDate;

    @TableField(exist = false)
    private Purchase purchase;

    @TableField(exist = false)
    private SupplierDrug supplierDrug;
}
